package com.test.testauth.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author ：wang qiang
 * @date ：Created 2024/8/1 16:21
 * @description：指令方法的枚举
 */
public interface VisualizationMethod {

    Integer returnSuccessCode = 99991; //接口成功返回code
    Integer returnErrorCode = 99992; //接口错误返回code

    /**无人机类型**/
    @Getter
    @AllArgsConstructor
    enum InstructType{
        DAJI("大疆无人机","DJ"),
        DAOTONG("道通无人机","DT"),
        UAV4G("4G无人机","UAV4G"),
        UAVNo4G("非4G无人机","UAVNo4G")
        ;
        private String label;
        private String value;

        public static List<DictValue> getList() {
            return Arrays.stream(VisualizationMethod.InstructMethod.values())
                    .map(item -> new DictValue(item.label, item.value))
                    .collect(Collectors.toList());
        }
    }
    /**指令类别**/
    @Getter
    @AllArgsConstructor
    enum InstructMethod{
        //机巢
        REST("复位","11003"),
        EMERGENCYSTOP("急停","11004"),
        ONECLICKGOFLY("一键复飞","16007"),
        OPENDOOR("开启舱门","12001"),
        CLOSEDOOR("关闭舱门","12002"),
        OPENREMOTECONTROL("开启遥控器","13001"),
        CLOSEREMOTECONTROL("关闭遥控器","13002"),
        OPENBACKMIDDLEPOLE("开启归中杆","23001"),
        CLOSEBACKMIDDLEPOLE("关闭归中杆","23002"),
        UPPLATFORM("上升平台","24001"),
        DOWNPLATFORM("下降平台","24002"),

        //无人机
        OPENUAV("开启无人机","14001"),
        CLOSEUAV("关闭无人机","14002"),
        RETURNFLYUAV("返航无人机","100460"),
        EMERGENCYSTOPUAV("急停无人机","100460"),
        SECUREMERGENCYSTOPUAV("解除急停无人机","100460"),
        CAMERAVISIBLELIGHT("摄像头可见光","100460"),
        CAMERAINFRARED("摄像头红外","100184"),
        CONTROLUP("云台控制-上","110000"),
        CONTROLDOWN("云台控制-下","110000"),
        CONTROLLEFT("云台控制-左","110000"),
        CONTROLRIGHT("云台控制-右","110000"),
        UAVCONTROLUP("无人机控制-上升","110000"),
        UAVCONTROLDOWN("无人机控制-下降","110000"),
        UAVCONTROLFORWARD("无人机控制-前","110000"),
        UAVCONTROLBACK("无人机控制-后","110000"),
        UAVCONTROLLEFT("无人机控制-左","110000"),
        UAVCONTROLRIGHT("无人机控制-右","110000")

        ;
        private String label;
        private String value;
        public static List<DictValue> getList() {
            return Arrays.stream(VisualizationMethod.InstructMethod.values())
                    .map(item -> new DictValue(item.label, item.value))
                    .collect(Collectors.toList());
        }
    }
}
